export const triggerCapture = () => {
  window.Slardar('captureException', new Error('manual captureException'))
}

export const triggerCaptureErrorEvent = () => {
  window.addEventListener('error', (e) => {
    window.Slardar('captureException', e as any)
  })
  const a = undefined
  // @ts-expect-error
  a.b()
}

export const triggerCapturePromiseRejection = () => {
  window.addEventListener('unhandledrejection', (e) => {
    window.Slardar('captureException', e as any)
  })
  new Promise((_resolve, reject) => {
    reject('test')
  })
}
